#ifndef _STRAWGUI_RESOURCE_CONTENT_H_
#define _STRAWGUI_RESOURCE_CONTENT_H_

#include "sNamedObject.h"
#include "DataBase.h"
#include "sConfig.h"

namespace sgui
{
namespace res
{

class sResourceContent : public sGUIObject
#ifdef _EDITOR
	, public rtti::sObject
#endif
{
private:
	std::wstring				m_fileName;
    void*                   m_data;
    u32                     m_size;
	std::wstring			m_recordType;
public:
	const std::wstring& getRecordType() const;
	void setRecordType(const std::wstring& recordType);

	const std::wstring& getFileName() const;
	void setFileName(const std::wstring& fileName);

	std::wstring getExtention() const;

	const u32& getDataSize() const;
	void setDataSize(const u32& dataSize);

	void* getData() const;
    
	void save(db::Record& file) const;
	void load(const db::Record& file);
    void clear();

#ifdef _EDITOR
	void loadFromFile(const std::wstring& fileName);
	void saveToFile(const std::wstring& fileName);
	void exportRTTI(rtti::sInfoList& list);
#endif

public:
    sResourceContent(sGUI& gui);
    ~sResourceContent();
};

};
};

#endif